<% if (ob.templateData.length) { %>
  <table class="shippingTable clrBr">
  <% ob.templateData.forEach((option, tdi) => { %>
    <tr class="tx5 clrBr borderBottom">
      <th><%= option.name %></th>
      <% if (option.type === "LOCAL_PICKUP") { %>
        <th colspan="3"><%= ob.polyT('listingDetail.localPickup') %></th>
      <% } else { %>
        <th><%= ob.polyT('listingDetail.deliveryTime') %></th>
        <th><%= ob.polyT('listingDetail.priceFirst') %></th>
        <th><%= ob.polyT('listingDetail.priceSecond') %></th>
      <% } %>
    </tr>
    <%
      option.services
        .sort((a,b) => {
          let sorter = 0;

          try {
            sorter = a.bigPrice.minus(b.bigPrice);
          } catch (e) {
            // pass
          }
          
          return sorter;
        })
        .forEach((service, si) => {
    %>
      <% if (service.bigPrice && service.bigPrice.eq(0)) var fShp = true; %>
      <tr class="<% if (fShp) print('txB') %> <% if (si === option.services.length -1) print('lastRow') %>">
        <td><%= service.name %></td>
        <td><%= service.estimatedDelivery %></td>
        <td>
          <% if (fShp) { %>
            <div class="clrE1 clrTOnEmph phraseBox floL"><%= ob.polyT('listingDetail.freeShippingBanner') %></div>
          <% } else { %>
            <%= 
              ob.currencyMod.convertAndFormatCurrency(
                service.bigPrice,
                ob.pricingCurrency,
                ob.displayCurrency
              )
            %>
          <% } %>
        </td>
        <td>
          <% if (service.bigAdditionalItemPrice && service.bigAdditionalItemPrice.eq(0)) { %>
            <div class="clrE1 clrTOnEmph phraseBox floL"><%= ob.polyT('listingDetail.freeShippingBanner') %></div>
          <% } else { %>
            <%= 
              ob.currencyMod.convertAndFormatCurrency(
                service.bigAdditionalItemPrice,
                ob.pricingCurrency,
                ob.displayCurrency
              )
            %>
          <% } %>
        </td>
      </tr>
    <% }) %>
  <% }); %>
  </table>
<% } else { %>
  <hr class="row">
  <div class="rowLg tx4 txCtr">
    <%= ob.polyT('listingDetail.noShippingFound') %>
  </div>
<% } %>
